<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'Demo.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
    <title>铁路运输登陆界面</title>
  </head>
  
  <body style=background-image:url(18.jpg);>
   <center>
   <h1><font color="red">12593铁路运输用户注册界面</font></h1>
   <hr/>
   <br/>
   <br/>
   <%   int leval = (Integer)session.getAttribute("leval");
        if(leval <= 2) {
   		request.setCharacterEncoding("utf-8") ;
        String tid = request.getParameter("tid");
        String carr = request.getParameter("carr");
        String seatn = request.getParameter("seatn");
        String price = request.getParameter("price");
   %> 
    <form action="admin" method="post" onsubmit="return login()">
    <table>
      <tr>
		<td colspan="2"><h1>车票信息修改</h1> </td>
	  </tr>
      <tr>
        <td>车&nbsp;票&nbsp;号</td>
        <td><input type="text" name="tId" value=<%=tid %>></td>
      </tr>
       <tr>
        <td>车&nbsp;厢&nbsp;号</td>
        <td><input type="text" name="carr" value=<%=carr %>></td>
      </tr>
       <tr>
        <td>座&nbsp;位&nbsp;号</td>
        <td><input type="text" name="seatN" value=<%=seatn %>></td>
      </tr>
       <tr>
        <td>价&nbsp;&nbsp;&nbsp;&nbsp;格</td>
        <td><input type="text" name="price" value=<%=price %>></td>
      </tr>
      <tr>
		<td colspan="2">
		    <input type="hidden" name="status" value="modifyT">
			<input type="submit" value="提交">
			<input type="reset" value="重置">
		</td>
	  </tr>
	  <tr>
	     <td  colspan="2"><a href = "AdminCtrl.jsp"><h1>返回主页面</h1></a></td>
	  </tr>
    </table>
    </form>
     <%
        }else{
        response.setHeader("refresh","2;url=AdminCtrl.jsp");
    %>
        只有二级以上管理员才有修改车票的权利!!!
        两秒后自动跳转到主页面！！！<br>
	    如果没有跳转，请点击<a href="AdminCtrl.jsp">这里</a>!!!<br>
    <%  
      }
    %>
   </center>
  </body>
</html>
